﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using NutriStat;

namespace NutriStat
{
    public partial class ImportFormatTimeDialog : NutriDialog
    {
        public ImportFormatTimeDialog()
        {
            InitializeComponent();
            ConfigureFormControls();
        }

        private void buttonCancel_Click(object sender, EventArgs e)
        {
            this.Close();            
        }
        
        private void buttonOK_Click(object sender, EventArgs e)
        {
            if (radioButtonCodeDays.Checked)
                result = SharedStrings._DAYS;
            else if (radioButtonCodeMonths.Checked)
                result = SharedStrings._MONTHS;
            else if (radioButtonCodeYears.Checked)
                result = SharedStrings._YEARS;
            else
                return;

            this.Close();
        }

        protected internal override void ConfigureFormControls()
        {
            base.ConfigureFormControls();

            radioButtonCodeDays.Text = SharedStrings.DAYS;
            radioButtonCodeMonths.Text = SharedStrings.MONTHS;
            radioButtonCodeYears.Text = SharedStrings.YEARS;
        }
    }
}
